/**
 * Created by Dalyn on 2017/3/16.
 */
import Relay from "react-relay";

export default class orderFinanceInvoiceTree extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { orderFinanceInvoiceTree }`;
    }

    getVariables() {
        return {
            argsInput: {
                orderId: this.props.orderId
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on orderFinanceInvoiceTreePayload {
            orderFinanceInvoiceTree {
                 token
                 userId
                 value
                 errorCode
                 totalResult
                 authorityId
                 orderNodes
                 id
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on orderFinanceInvoiceTreePayload {
                    orderFinanceInvoiceTree {
                        token
                        userId
                        value
                        errorCode
                        totalResult
                        authorityId
                        orderNodes
                        id
                    }
                }
            `]
        }];
    }

}
